package javaspaces;

import net.jini.core.entry.Entry;

public class WorkEntry implements Entry {
	
	public String msg;
	public Integer count;
	
	public WorkEntry() {
	}
	
	public WorkEntry(String msg, int intValue) {
		this.msg = msg;
		this.count = new Integer(intValue);
	}

	public void increment() {
		if (count == null) {
			count = new Integer(0);
		}
		count = new Integer(count.intValue() + 1);
	}
	
	public String toString() {
		return "["+ msg + "] count: "+ count;
	}
}
